package examples;

import com.google.code.jqwicket.JQBehavior;
import com.google.code.jqwicket.api.JQuery;
import com.google.code.jqwicket.api.S;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.form.TextArea;

/**
 * Created by IntelliJ IDEA.
 * User: Bezdelnick
 * Date: 08.09.12
 * Time: 19:20
 * To change this template use File | Settings | File Templates.
 */
public class TestJqWicketPage extends WebPage {
    public TestJqWicketPage() {
        //
        String attr = "selectionStart";

        add(new JQBehavior(
                S.id("link").to$().click(JQuery.$f("" +
                        "var position = $('#rich_editor').getCursorPosition(); " +
                        "alert(position)"
                ))
        ));

        add(new JQBehavior(
                S.id("link0").to$().click(JQuery.$f(
                        "alert('hello world!')"
                ))
        ));
    }
}
